import http from "@/utils/http2.js";

export function saveProduct(data) {
  return http.post("/product", data);
}

export function queryList(params) {
  return http.post("/product/list", params);
}

export function deleteProduct(id) {
  return http.delete("/product/delete", id);
}
export function updateStatus(id, status) {
  return http.get("/product/updateStatus?id=" + id + "&status=" + status);
}
export function getProductById(id) {
  return http.get("/product/findById", { id });
}
export function updateProduct(data) {
  return http.put("/product/update", data);
}

export function getProductList(data) {
  return http.post("/product/query", data);
}
export function getProductDetail(id) {
  return http.get("/product/detail", { id });
}
